package com.aiju.cash.ui.main.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 作者：流冥 on 2017/6/15 14:28
 * 说明：
 */

public class Select implements Serializable {
    private String shopName;//店铺名
    private String queryStoreId;//店铺名(查询条件中)店铺编号，如果不选，默认全部，传空字符串就ok了
    private String employName;//员工名
    private String employForStoreId; //所选员工对应的storeid
    private String dateDes;//(查询条件中)传值说明：近七天：nearly7，今日：today，昨日：yesterday，本周：thisweek，本月：thismonth，上月：lastweek,自定义时间段： yyyy-MM-dd,yyyy-MM-dd （自定义时间段用逗号分隔）
    private String startDate;//开始日期
    private String operatorId;//(查询条件中)操作员编号
    private String commitStartTime;
    private String commitEndTime;
    private Date firstDate;
    private Date lastDate;

    public String getEmployForStoreId() {
        return employForStoreId;
    }

    public void setEmployForStoreId(String employForStoreId) {
        this.employForStoreId = employForStoreId;
    }

    public Date getFirstDate() {
        return firstDate;
    }

    public void setFirstDate(Date firstDate) {
        this.firstDate = firstDate;
    }

    public Date getLastDate() {
        return lastDate;
    }

    public void setLastDate(Date lastDate) {
        this.lastDate = lastDate;
    }

    public String getCommitStartTime() {
        return commitStartTime;
    }

    public void setCommitStartTime(String commitStartTime) {
        this.commitStartTime = commitStartTime;
    }

    @Override
    public String toString() {
        return "Select{" +
                "queryStoreId='" + queryStoreId + '\'' +
                ", operatorId='" + operatorId + '\'' +
                ", dateTrans='" + dateTrans + '\'' +
                ", payType='" + payType + '\'' +
                ", tradeType='" + tradeType + '\'' +
                '}';
    }

    public String getCommitEndTime() {
        return commitEndTime;
    }

    public void setCommitEndTime(String commitEndTime) {
        this.commitEndTime = commitEndTime;
    }

    public String getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(String operatorId) {
        this.operatorId = operatorId;
    }

    public String getQueryStoreId() {
        return queryStoreId;
    }

    public void setQueryStoreId(String queryStoreId) {
        this.queryStoreId = queryStoreId;
    }

    private String endDate;//结束日期
    private String other;//其他
    private String sum;//总计
    private String gathering;//收款
    private String dateTrans;

    public String getDateTrans() {
        return transDate(getDateDes());
    }

    public void setDateTrans(String dateTrans) {
        this.dateTrans = dateTrans;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public String getTradeType() {
        return tradeType;
    }

    public void setTradeType(String tradeType) {
        this.tradeType = tradeType;
    }

    private String refund;//退款
    private String payType;//(查询条件中)交易渠道（支付宝，微信，现金，二维码台卡），直接传值汉字就ok了 ，多个查询条件以逗号分隔
    private String tradeType;//退款(查询条件中)交易类别，值为1或者2（1 收款，2 退款） 多个查询条件以逗号分隔


    public String getSum() {
        return sum;
    }

    public void setSum(String sum) {
        this.sum = sum;
    }

    public String getGathering() {
        return gathering;
    }

    public void setGathering(String gathering) {
        this.gathering = gathering;
    }

    public String getRefund() {
        return refund;
    }

    public void setRefund(String refund) {
        this.refund = refund;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getEmployName() {
        return employName;
    }

    public void setEmployName(String employName) {
        this.employName = employName;
    }

    public String getDateDes() {
        return dateDes;
    }

    public void setDateDes(String dateDes) {
        this.dateDes = dateDes;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getOther() {
        return other;
    }

    public void setOther(String other) {
        this.other = other;
    }


    private String transDate(String str) {
        switch (str) {
            case "近7日":
                return "nearly7";
            case "今天":
                return "today";
            case "昨天":
                return "yesterday";
            case "本周":
                return "thisweek";
            case "本月":
                return "thismonth";
            case "上月":
                return "lastweek";
            case "自定义":
                return "自定义";
            default:
                return "";
        }


    }
}
